libs/foreignmem: Fix/simplify errno handling for map_resource
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 3 Feb 2021 15:43:35 +0000 (15:43 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 3 Feb 2021 19:25:35 +0000 (19:25 +0000)
commitd203dbd69f1a02577dd6fe571d72beb980c548a6
tree54680335ecd6c03e513bc9c1876d8ce1e99df473
parent9351e1468d67ee79fbc6411b087c67ac34813891
libs/foreignmem: Fix/simplify errno handling for map_resource

Simplify the FreeBSD and Linux logic, left in this state by the previous
change.  No functional change.

Duplicate the FreeBSD logic for NetBSD, to maintain the uniform ABI for
callers that EOPNOTSUPP covers all Xen/Kernel support.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
tools/libs/foreignmemory/freebsd.c
tools/libs/foreignmemory/linux.c
tools/libs/foreignmemory/netbsd.c